package com.itheima.arrays;

import java.util.Arrays;

public class ArraysDemo {
    public static void main(String[] args) {
        int[] arr = {3, 2, 4, 6, 7};
        System.out.println(Arrays.toString(arr));

        Arrays.sort(arr);
        System.out.println(Arrays.toString(arr));
        int[] arr2 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        int index = Arrays.binarySearch(arr2, 10);
        System.out.println(index);
        int index2 = Arrays.binarySearch(arr2, 0);
        System.out.println(index2);
    }
}
